package com.zq.webserver.interfaces.user.service;

import com.zq.webserver.interfaces.user.dao.UserMapper;
import com.zq.webserver.interfaces.user.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by zhouquan on 2017/11/13.
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 新增用户
     *
     * @param user
     */
    @Transactional(rollbackFor = Exception.class)
    public void addUser(User user) {
        userMapper.addUser(user);
//        throw new Exception("aaaaa");
    }
}
